package com.wicket.okrframework.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.wicket.okrframework.biz.service.BusinessAtomService;
import com.wicket.okrframework.biz.service.dto.req.*;
import com.wicket.okrframework.biz.service.dto.res.*;
import com.wicket.okrframework.common.ro.OkrResult;
import com.wicket.okrframework.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/base/businessAtom/")
public class BusinessAtomController {

  @Autowired
  BusinessAtomService businessAtomService;
/**
   * D1查询框架内存业务数据列表(业务原子)
   */
    @PostMapping("queryFrameWorkMemoryBusinessSetDataListCom")
    public OkrResult<QueryFrameWorkMemoryBusinessSetDataListComRespDto> queryFrameWorkMemoryBusinessSetDataListCom(@RequestBody @Validated QueryFrameWorkMemoryBusinessSetDataListComReqDto reqDTO){
    return OkrResult.success(businessAtomService.queryFrameWorkMemoryBusinessSetDataListCom(reqDTO));
    }
/**
   * D1新增框架内存业务数据(业务原子)
   */
    @PostMapping("addFrameWorkMemoryBusinessSetDataCom")
    public OkrResult<AddFrameWorkMemoryBusinessSetDataComRespDto> addFrameWorkMemoryBusinessSetDataCom(@RequestBody @Validated AddFrameWorkMemoryBusinessSetDataComReqDto reqDTO){
    return OkrResult.success(businessAtomService.addFrameWorkMemoryBusinessSetDataCom(reqDTO));
    }
/**
   * D1分段查询框架服务数据对象(业务原子)
   */
    @PostMapping("implementSegQueryBaseDataSetCom")
    public OkrResult<ImplementSegQueryBaseDataSetComRespDto> implementSegQueryBaseDataSetCom(@RequestBody @Validated ImplementSegQueryBaseDataSetComReqDto reqDTO){
    return OkrResult.success(businessAtomService.implementSegQueryBaseDataSetCom(reqDTO));
    }
}
